package com.dy.service;

import com.dy.entity.Order;
import com.dy.entity.OrderVo;
import com.dy.service.impl.FeignOrderServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Auther: dy
 * @Date: 2022/4/16 - 04 - 16 - 17:30
 * @Description: com.dy.service
 * @version: 1.0
 */
@FeignClient(name = "order",fallback = FeignOrderServiceImpl.class)
public interface IFeignOrderService {
    @PostMapping("/order/insertOrder")
    public String insertOrder(@RequestBody OrderVo orderVo);

    @PostMapping("/order/shakedown")
    public String shakedown(@RequestBody OrderVo orderVo);

    @GetMapping("/order/updateOrderState/{orderSerial}")
    public boolean updateOrderState(@PathVariable("orderSerial")String orderSerial);

    @PostMapping("/order/persistent")
    public boolean persistent(@RequestBody Order order);
}
